package visuals;

import javax.swing.*;
import java.awt.*;

import song.Song;
import options.Options;

/**
 * Created by IntelliJ IDEA.
 * User: Aleksey
 * Date: 03.01.2008
 * Time: 1:47:19
 */
public class MainFrame extends JFrame {
    private JPanel mainPanel = new JPanel();
    private static Song song;
    private static EastPanel eastPanel;
    private static CenterPanel centerPanel;

    public static Song getSong() {
        return song;
    }

    public static EastPanel getEastPanel() {
        return eastPanel;
    }

    public static CenterPanel getCenterPanel() {
        return centerPanel;
    }

    public MainFrame(Song song) throws HeadlessException {
        super();
        MainFrame.song = song;
        setTitle("Drummerizer " + Options.PROGRAM_VERSION);
        setSize(800, 600);
        setExtendedState(JFrame.MAXIMIZED_BOTH);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        mainPanel.setLayout(new BorderLayout());

        eastPanel = new EastPanel();
        centerPanel = new CenterPanel();

        mainPanel.add(eastPanel, BorderLayout.EAST);
        mainPanel.add(new SouthPanel(), BorderLayout.SOUTH);
        mainPanel.add(centerPanel, BorderLayout.CENTER);

        add(mainPanel);

        setVisible(true);
    }
}
